package com.test;

import java.awt.*;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

/**
 * @author wufagang
 * @description
 * @date 2022年06月18日 12:11
 */
public class Futuretest {
    public static class Task implements Callable<String> {


        @Override
        public String call() throws Exception {
            System.out.println("------");
            return "aa";
        }
    }

    public static void main(String[] args) {
        ExecutorService threadPool = Executors.newCachedThreadPool();
        for (;;){
            threadPool.submit(new Task());
        }

    }
}
